#pragma once

#include <map>

namespace qua
{
    class cp_decoder
    {
    public:
        cp_decoder( const int *cp_codes = 0 ) : m_codes( cp_codes ) { }

        char to_char( int code );
        int to_unicode( char sign );

    private:
        const int *             m_codes;
        std::map< int, char >   m_match;

        void match();
    };
}
